#include "DebugTracer.h"

DebugTracer _DEBUGTRACER;

DebugTracer::DebugTracer()
{
    m_fileBuffer = new std::filebuf();
    m_fileBuffer->open("log/debug.log",std::ios::out);
    m_os = new std::ostream(m_fileBuffer);
}
void DebugTracer::Print(std::string message)
{
    (*m_os)<<message<<std::endl;
}
void DebugTracer::Print(Ogre::Real value)
{
    char buffer[20];
    sprintf(buffer,"%f",value);
    (*m_os)<<buffer<<std::endl;
}
DebugTracer::~DebugTracer()
{
    m_fileBuffer->close();
}
